package com.kma.summer2012.client.Autorisation;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

/**
 * Created by IntelliJ IDEA.
 * User: Администратор
 * Date: 17.01.13
 * Time: 9:54
 * To change this template use File | Settings | File Templates.
 */
public class LoginEvent extends GwtEvent<LoginEvent.LoginEventHandler> {

    private static Type<LoginEventHandler> TYPE = new Type<LoginEventHandler>();

    public interface LoginEventHandler extends EventHandler {
        void onLogin();
    }

    @Override
    public Type<LoginEventHandler> getAssociatedType() {
        return TYPE;
    }

    public static Type<LoginEventHandler> getType() {
        return TYPE;
    }
        @Override
    protected void dispatch(LoginEventHandler handler) {
        handler.onLogin();
    }
}

